package entity;
//宝宝
public class Body {
    //一个宝贝出生时，必须确定亲生母亲和性别
    public Body(Woman mother, String gender){
        this.mother = mother;
        this.gender = gender;
    }

    //姓名，可以出生后再取名，也可以改名
    private String name;
    private Woman mother;
    private String gender;

    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }

    public Woman getMother() {
        return mother;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public void setMother(Woman mother) {
        this.mother = mother;
    }

    public void introduce(){
        System.out.println("我是一个"+this.getGender()+"宝宝，我的妈妈是"+this.getMother().getName());
        if (name==null){
            System.out.println("我的名字还没有被确定，请给我取个名字吧！");
        }else {
            System.out.println("我叫:"+this.getName());
        }
    }
}
